package phoenix.web.test_suites.flirt.common.payment;

import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

import phoenix.core.base.TestSuiteBase;
import phoenix.web.test_objects.PaymentTests;

public class MainFormTS extends TestSuiteBase

{
	private final PaymentTests paymentTests = new PaymentTests(phoenix);

	@DataProvider
	public Object[][] cardNumberValidation()
	{
		return paymentTests.dataProviders.paymentCardNumberValidation();
	}

	@DataProvider
	public Object[][] cardNameValidation()
	{
		return paymentTests.dataProviders.paymentCardNameValidation();
	}

	@DataProvider
	public Object[][] cardSecurityCodeValidation()
	{
		return paymentTests.dataProviders.paymentCardSecurityCodeValidation();
	}

	@DataProvider
	public Object[][] cardExpiryDateValidation()
	{
		return paymentTests.dataProviders.paymentExpiryDateValidation();
	}

	@Test(groups = { "male" }, dataProvider = "cardNumberValidation", enabled = true)
	public void validateCardNumberTest(String p_cardNumberValue, String p_fieldType, boolean p_expectedResult)
	{
		paymentTests.validateCardNumberTest(p_cardNumberValue, p_fieldType, p_expectedResult);
	}

	@Test(groups = { "male" }, dataProvider = "cardNameValidation", enabled = true)
	public void validateCardNameTest(String p_cardNameValue, String p_fieldType, boolean p_expectedResult)
	{
		paymentTests.validateCardNameTest(p_cardNameValue, p_fieldType, p_expectedResult);
	}

	@Test(groups = { "male" }, dataProvider = "cardSecurityCodeValidation", enabled = true)
	public void validateSecurityCodeTest(String p_cardCodeValue, String p_fieldType, boolean p_expectedResult)
	{
		paymentTests.validateCardSecurityCodeTest(p_cardCodeValue, p_fieldType, p_expectedResult);
	}

	@Test(groups = { "male" }, dataProvider = "cardExpiryDateValidation", enabled = true)
	public void validateExpiryDateTest(String p_mounthValue, String p_yearValue, String p_fieldType, boolean p_expectedResult)
	{
		paymentTests.validateExpiryDateTest(p_mounthValue, p_yearValue, p_fieldType, p_expectedResult);
	}
}
